
class MyCompleter:
    def __init__(self, names):
        self.TOCOMP = [
            "quit", "list", 'show', 'hide', 'wohi', 'status'
            ]
        self.NAMES = names

    def complete(self, text, state):
        results = [x + " " for x in self.TOCOMP if x.startswith(text)]
        results += [x + ": " for x in self.NAMES.keys() if x.startswith(text)]
        results.append(None)
        return results[state]
